/**
 * Created by chuck7 on 16/7/30.
 */
import * as types from '../mutation_types'
import service from '../../services/trd/index'
export const getTrdOneList = ({ dispatch },employee_id,time) =>{
  return service.getTrdOneList(employee_id,time).then(res=>{
    if(res.success){
        dispatch(types.RECEIVE_ALL_TRDS,res.data);
    }
  })
}

export const getTrdStatistics = ({ dispatch },employee_id) =>{
  return service.getTrdStatistics(employee_id).then(res=>{
    if(res.success){
        dispatch(types.RECEIVE_ALL_TRDSTATISTICS,res.data);
    }
  })
}
